import { h } from "vue";
import { Icon } from "@iconify/vue";
import { IconifyIcon } from "@iconify/vue/dist/offline";

/**
 * 图标渲染
 */
export const useRenderIcon = (icon: IconifyIcon) => {
  return () => h(Icon, { icon });
};

/**
 * 获取图标组件
 */
export const useIcon = (icon: IconifyIcon) => {
  return h(Icon, { icon });
};
